import java.math.BigInteger;

/**
 * 奇数倍数
 */
public class OddNumberMultiple {
    public static void main(String[] args) {
        BigInteger num = new BigInteger(String.valueOf(2019 * 2));
        int add = 2019;
        while (true) {
            if (isOddAll(num)) {
                break;
            }
            num = num.add(BigInteger.valueOf(2019));
        }
        System.out.println(num);
    }

    private static boolean isOddAll(BigInteger num) {
        String str = num.toString();
        for (int i = 0; i < str.length(); i++) {
            if (Character.getNumericValue(str.charAt(i)) % 2 == 0) {
                return false;
            }
        }
        return true;
    }
}
